#include<stdio.h>
int main()
{
	int a;
	int b;
	int c;
	scanf("%d %d",&a,&b);
	int sum;
	int k;
	for(c=0;c<b;c++)
	{
		k=k*10+a;
		sum=sum+k;
	}
	printf("%d",sum);
}
//k a sum
//0 2 2
//2 2 4 
//22 2 26 
//2
2
22
222
2222
22222
222222
